package com.lx.patterns.combination;

/**
 * @ClassName MenuComponent
 * @Description: //抽象组建
 * @Author: 落雪
 * @CreateDate: 2025/1/26 14:28
 * @UpdateUser: 落雪
 * @UpdateDate: 2025/1/26 14:28
 * @UpdateRemark:
 * @Version: 1.0
 */
public abstract class MenuComponent {

    protected String name;

    protected int level;

    public  void  add(MenuComponent menuComponent){
        throw new UnsupportedOperationException();
    }

    public  void  remove(MenuComponent menuComponent){
        throw new UnsupportedOperationException();
    }

    public  MenuComponent getChild(int index){
        throw new UnsupportedOperationException();
    }

    public String getName() {
        return name;
    }

    public void print(){
        throw new UnsupportedOperationException();
    }
}
